<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .div {
            width: 500px;
            height: 500px;
            border: 2px solid black;
            margin: 0 auto;
            margin-top: 100px;
            border-radius: 50%;
            background-size: 101%;
        }

        section {
            width: 100%;
            height: 10px;
            margin-top: 245px;
            position: relative;
        }

        .div1 {
            width: 300px;
            height: 10px;
            background-color: black;
            margin-left: 160px;
            animation-fill-mode: forwards;
        }

        ul {
            width: 500px;
            height: 15px;
            margin-top: -12px;
            position: relative;
            position: absolute;
            animation-fill-mode: forwards;
            transform: rotate();
        }

        .div2 {
            width: 230px;
            height: 15px;
            background-color: black;
            margin-left: 200px;
        }
    </style>
</head>

<body>
    <div class="div">
        <section>
            <!-- 秒针 -->
            <div class="div1"></div>
        </section>
        <ul class="minute">
            <!-- 分针 -->
            <div class="div2"></div>
        </ul>
    </div>
</body>
<script>
    var second = document.querySelector('section');
    var minute = document.querySelector('.minute');
    var num = 0;

    setInterval(function () {    //定时器
        num = num + 6;
        // console.log(num);
        second.style.transform = "rotate(" + num + "deg)";
        if (num == 360) {
            num = 0;
            minute.style.transform = "rotate(6deg)";
        }
    }, 1000);
</script>

</html>